<template>
  <!-- CombAndSplit -->
  <div id="CombAndSplit">
    <root name="CombAndSplit">
      <SafeHeader
        v-bind="{
          title: '组装拆分',
          isBack: true,
          fixedTop: true,
        }"
      >
      </SafeHeader>
      <v-tabs fixed-tabs height="40" v-model="tab">
        <v-tab class="wms-tab"> 拆分</v-tab>
        <v-tab class="wms-tab"> 组装</v-tab>

        <!-- 拆分 -->
        <v-tab-item transition="slide-y-transition" class="pickingWrap">
          <div>
            <v-container>
              <v-card outlined class="py-4">
                <v-row class="ma-0 mb-4">
                  <v-col class="py-1">
                    <v-text-field
                      autofocus
                      clearable
                      filled
                      :prepend-inner-icon="mdiCreditCardScan"
                      class="my-0 inputPlaceholder"
                      @keydown.13="splitBoxCodeSearch"
                      dense
                      hide-details
                      v-model="splitFormData.boxCode"
                      placeholder="请扫描待拆分物料追踪号"
                    ></v-text-field>
                  </v-col>
                </v-row>
                <v-row class="ma-1 mb-4">
                  <v-col class="py-0">
                    <v-text-field
                      label="物料编码"
                      dense
                      required
                      disabled
                      hide-details
                      v-model="splitFormData.itemCode"
                    ></v-text-field>
                  </v-col>
                </v-row>
                <v-row class="ma-1 mb-4">
                  <v-col class="py-0">
                    <v-text-field
                      label="物料名称"
                      dense
                      required
                      disabled
                      hide-details
                      v-model="splitFormData.itemName"
                    ></v-text-field>
                  </v-col>
                </v-row>
                <v-row class="ma-1 mb-5">
                  <v-col class="py-0">
                    <v-text-field
                      label="批次"
                      dense
                      disabled
                      v-model="splitFormData.batchName"
                      hide-details
                    ></v-text-field>
                  </v-col>
                </v-row>

                <v-row class="ma-0 mb-5">
                  <v-col
                    cols="8"
                    class="py-0 d-flex align-center font-weight-bold"
                    style="font-size: 15px"
                  >
                    <v-text-field
                      label="待拆分数量"
                      dense
                      hide-details
                      readonly
                      v-model="splitFormData.unPackQty"
                    >
                    </v-text-field>
                  </v-col>
                  <v-col cols="4">
                    <v-btn
                    class="navigationBtns_return"
                    dark
                    style="
                      height: 30px;
                      background-color: #4169e1 !important;
                      fontcolor: #ffff !important;
                    "
                      @click="splitSubmit"
                      >提交
                    </v-btn>
                  </v-col>
                </v-row>

                <v-row class="ma-0 mb-5">
                  <v-col
                    cols="6"
                    class="py-0 d-flex align-center font-weight-bold"
                    style="font-size: 15px"
                  >
                    <v-text-field
                      label="包装内数量"
                      id="id-packQty"
                      class="inputPlaceholder"
                      dense
                      clearable
                      filled
                      hide-details
                      type="number"
                      v-model="splitFormData.packQty"
                      @input="packQtyChange"
                    ></v-text-field>
                  </v-col>
                  <v-col
                    cols="6"
                    class="py-0 d-flex align-center font-weight-bold"
                    style="font-size: 15px"
                  >
                    <v-text-field
                      label="包装个数"
                      class="inputPlaceholder"
                      hint="自动计算"
                      @input="packNumChange"
                      type="number"
                      v-model="splitFormData.number"
                    ></v-text-field>
                  </v-col>
                </v-row>
                <v-row class="ma-0 mb-6">
                  <v-col
                    cols="6"
                    class="py-0 d-flex align-center font-weight-bold"
                    style="font-size: 15px"
                  >
                    <v-text-field
                      label="剩余数量"
                      readonly
                      v-model="splitFormData.lastQty"
                      hint="自动计算,不支持修改"
                    >
                    </v-text-field>
                  </v-col>
                </v-row>

                <!-- <v-row class="ma-0 mb-3">
                  
                </v-row> -->
              </v-card>
            </v-container>
          </div>
        </v-tab-item>
        <!-- 组装页面 -->
        <v-tab-item class="task" transition="slide-y-transition">
          <v-container>
            <v-card outlined class="py-2 mt-2">
              <v-row class="ma-0 mb-4">
                <v-col class="py-1">
                  <v-text-field
                    autofocus
                    clearable
                    filled
                    :prepend-inner-icon="mdiCreditCardScan"
                    class="my-0 inputPlaceholder"
                    @keydown.13="combBoxCodeSearch"
                    dense
                    hide-details
                    v-model="combFormData.srcBoxCode"
                    placeholder="请扫描待合并物料追踪号"
                  ></v-text-field>
                </v-col>
              </v-row>
              <v-row class="ma-1 mb-4">
                <v-col class="py-0">
                  <v-text-field
                    label="物料编码"
                    dense
                    required
                    disabled
                    hide-details
                    v-model="combFormData.itemCode"
                  ></v-text-field>
                </v-col>
              </v-row>
              <v-row class="ma-1 mb-4">
                <v-col class="py-0">
                  <v-text-field
                    label="物料名称"
                    dense
                    required
                    disabled
                    hide-details
                    v-model="combFormData.itemName"
                  ></v-text-field>
                </v-col>
              </v-row>
              <v-row class="ma-1 mb-5">
                <v-col class="py-0">
                  <v-text-field
                    label="批次"
                    dense
                    disabled
                    v-model="combFormData.batchName"
                    hide-details
                  ></v-text-field>
                </v-col>
              </v-row>

              <v-row class="ma-0 mb-5">
                <v-col
                  cols="6"
                  class="py-0 d-flex align-center font-weight-bold"
                  style="font-size: 15px"
                >
                  <v-text-field
                    label="原始数量"
                    dense
                    hide-details
                    readonly
                    v-model="combFormData.srcQty"
                  >
                  </v-text-field>
                </v-col>
                <v-col
                  cols="6"
                  class="py-0 d-flex align-center font-weight-bold"
                  style="font-size: 15px"
                >
                  <v-text-field
                    label="组装后数量"
                    dense
                    hide-details
                    readonly
                    v-model="combFormData.totalQty"
                  >
                  </v-text-field>
                </v-col>
              </v-row>
              <v-row class="ma-0 mb-4">
                <v-col class="py-1" cols="8">
                  <v-text-field
                    id="id-combToBoxCode"
                    clearable
                    filled
                    :prepend-inner-icon="mdiCreditCardScan"
                    class="my-0 inputPlaceholder"
                    @keydown.13="combToBoxCodeSearch"
                    dense
                    hide-details
                    v-model="combFormData.toBoxCode"
                    placeholder="请扫描追踪号"
                  ></v-text-field>
                </v-col>
                <v-col cols="4">
                  <v-btn
                    class="navigationBtns_return"
                    dark
                    style="
                      height: 30px;
                      background-color: #4169e1 !important;
                      fontcolor: #ffff !important;
                    "
                    @click="combSubmit"
                    >提交
                  </v-btn>
                </v-col>
              </v-row>
            </v-card>
          </v-container>

          <v-container class="task_list white">
            <v-row>
              <v-col
                cols="9"
                class="card-title"
                style="padding-bottom: 8px; padding-top: 8px"
                >组装列表
              </v-col>
              <v-col cols="3" style="padding-bottom: 8px; padding-top: 8px"
                >共计{{ combBoxes.length }}项
              </v-col>
            </v-row>
            <v-divider class="mb-2"></v-divider>
            <div v-if="combBoxes[0]">
              <v-container v-for="(item, index) in combBoxes" :key="index">
                <v-row>
                  <v-col cols="12" class="pa-0 pb-2">
                    <v-card outlined style="background-color: #f2f3f5">
                      <v-card-subtitle class="list_content">
                        
                        <v-row
                          class="
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable"
                            >追踪号
                          </v-col>
                          <v-col class="py-1 card-value"
                            >{{ item.boxCode }}
                          </v-col>
                        </v-row>
                        <v-row
                          class="
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable"
                            >物料编码
                          </v-col>
                          <v-col class="py-1 card-value"
                            >{{ item.itemCode }}
                          </v-col>
                        </v-row>
                        <v-row
                          class="
                            pa-0
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable"
                            >物料名称
                          </v-col>
                          <v-col class="py-1 card-value"
                            >{{ item.itemName }}
                          </v-col>
                        </v-row>
                        <v-row
                          class="
                            pa-0
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable"
                            >批次号
                          </v-col>
                          <v-col class="py-1 card-value"
                            >{{ item.batchName }}
                          </v-col>
                        </v-row>
                        <v-row
                          class="
                            pa-0
                            d-flex
                            flex-row
                            justify-space-between
                            wms-v-row
                          "
                        >
                          <v-col cols="4" class="py-1 card-lable">数量 </v-col>
                          <v-col class="py-1 card-value"
                            >{{ item.quantity }}
                          </v-col>
                        </v-row>
                        <!-- <v-divider class="mt-1 mb-2"></v-divider> -->
                      </v-card-subtitle>
                    </v-card>
                  </v-col>
                </v-row>
              </v-container>
            </div>

            <v-row v-else>
              <v-col cols="12" class="text-center">无数据</v-col>
            </v-row>
          </v-container>
        </v-tab-item>
      </v-tabs>
    </root>
    <v-dialog v-model="isConfirmVisible" min-width="330">
      <v-card class="mx-auto" max-width="330">
        <v-card-title class="text-h5">提 示</v-card-title>
        <v-card-text>
          <p></p>
          <div class="text--primary">{{ confirmMsg }}</div>
        </v-card-text>
        <v-card-actions>
          <v-spacer></v-spacer>
          <v-btn
            class="ma-1"
            text
            color="indigo"
            @click="isConfirmVisible = false"
            >取消</v-btn
          >
          <v-btn
            class="ma-1"
            text
            color="teal"
            @click="splitSubmitConfirm()"
            :loading="loading"
            >确认</v-btn
          >
        </v-card-actions>
      </v-card>
    </v-dialog>
    <v-overlay :value="overlay">
      <v-progress-circular indeterminate size="64"></v-progress-circular>
    </v-overlay>
  </div>
</template>

<script>
import Root from "@/components/Root.vue";
import SafeHeader from "@/components/safeHeader_wms.vue";
import wms from "@/utils/business_wms";
import _ from "lodash";
import { mdiCreditCardScan } from "@mdi/js";
import { printToJiaBo } from "@/static/print";

export default {
  name: "CombAndSplit",
  components: {
    Root,
    SafeHeader,
  },
  data() {
    return {
      mdiCreditCardScan: mdiCreditCardScan,

      overlay: false, //遮罩
      loading: false, //按钮加载状态
      tab: null, //tab页

      // tab1 出库任务表单
      splitFormData: {
        invId: "",
        itemCode: "",
        itemName: "",
        batchName: "",
        boxCode: "",
        unPackQty: "", //  待拆分数量
        packQty: "", // 每份的数量
        number: "", // 拆分的份数
        lastQty: "", //尾数数量
        acceptRecordCode : "", //收货单号
      },

      isConfirmVisible: false, //确认dialog
      confirmMsg: "", //确认提示信息

      combFormData: {
        srcInvId: "",
        srcBoxCode: "",
        toBoxCode: "",
        itemCode: "",
        itemName: "",
        batchName: "",
        srcQty: "",
        totalQty: "",
      },

      combBoxes: [],

      rules: {
        //待研究
        ctCodeRules: [(v) => !!v || "请扫描或输入拣货容器编码"],
        targetCtCodeRules: [(v) => !!v || "请扫描或输入目标容器编码"],
        prePickQtyRules: [(v) => !!v || "请输入需要拣货的数量"],
      },
    };
  },
  methods: {
    // -----------------------  拆分  -------------------
    /**
     * 查询待拆分的数据
     */
    splitBoxCodeSearch() {
      //Step1.校验数据
      if (!this.splitFormData.boxCode) {
        return this.$root.api.api.toast({
          msg: "追踪号为空",
          location: "middle",
        });
      }

      this.overlay = true;
      wms
        .get({
          url: "/inventorys/lpnStock",
          data: { boxCode: this.splitFormData.boxCode },
        })
        .then((res) => {
          this.overlay = false;
          if (res.status == 200 && res.data.code == 200) {
            // console.log(JSON.stringify(res));
            //校验返回的库存数据
            let lpnStock = res.data.data;
            if (lpnStock == null) {
              this.$root.api.api.toast({
                msg: "通过【" + this.splitFormData.boxCode + "】未查询到库存！",
                location: "middle",
              });
              this.splitFormData.boxCode = "";
              return false;
            }
            if (lpnStock.allotQuantity != 0) {
              this.$root.api.api.toast({
                msg:
                  "通过【" +
                  this.splitFormData.boxCode +
                  "】查询到库存存在已分配数量！",
                location: "middle",
              });
              this.splitFormData.boxCode = "";
              return false;
            }
            if (lpnStock.freezeQuantity != 0) {
              this.$root.api.api.toast({
                msg:
                  "通过【" +
                  this.splitFormData.boxCode +
                  "】查询到库存存在已冻结数量！",
                location: "middle",
              });
              this.splitFormData.boxCode = "";
              return false;
            }

            //赋值
            this.splitFormData.invId = lpnStock.inventoryId; //库存id
            this.splitFormData.itemCode = lpnStock.itemCode; // 物料编码
            this.splitFormData.itemName = lpnStock.itemName; // 物料名称
            this.splitFormData.batchName = lpnStock.batchName; // 批次号
            this.splitFormData.unPackQty = lpnStock.quantity; // 待拆分数量
            this.splitFormData.packQty = "";
            this.splitFormData.number = "";
            this.splitFormData.lastQty = "";
            this.splitFormData.acceptRecordCode = lpnStock.billNo;//收货单号

            // 打开目标库位焦点
            document.getElementById("id-packQty").focus();
          } else {
            alert("查询失败:" + res.data.message);
          }
        });
    },

    //监听包装内的数量的变化
    packQtyChange() {
      //校验数据是否齐备
      if (
        !this.splitFormData.itemCode ||
        !this.splitFormData.unPackQty ||
        !this.splitFormData.packQty
      ) {
        return false;
      }

      let val = this.splitFormData.packQty;
      let this_ = this;
      // 判断是否输入负数
      if (val <= 0) {
        this_.splitFormData.number = "";
        this_.splitFormData.lastQty = "";
        return alert("包装内数量不能小于等于0");
      }

      //校验数量是否超过
      if (parseFloat(val) > parseFloat(this.splitFormData.unPackQty)) {
        this_.splitFormData.number = "";
        this_.splitFormData.lastQty = "";
        return alert("超出待拆分数量，请确认");
      }

      this_.splitFormData.number = Math.floor(
        this_.splitFormData.unPackQty / val
      );
      this_.splitFormData.lastQty = this_.splitFormData.unPackQty % val;
    },

    //监听拆分的个数的变化
    packNumChange() {
      //校验数据是否齐备
      if (
        !this.splitFormData.itemCode ||
        !this.splitFormData.unPackQty ||
        !this.splitFormData.packQty
      ) {
        return false;
      }

      let val = this.splitFormData.number;
      let this_ = this;
      // 判断是否输入负数
      if (val <= 0) {
        this_.splitFormData.number = "";
        this_.splitFormData.lastQty = "";
        return alert("包装个数不能小于等于0");
      }

      let totalQty =
        Number(this_.splitFormData.packQty) *
        Number(this_.splitFormData.number);
      //校验数量是否超过
      if (parseFloat(totalQty) > parseFloat(this.splitFormData.unPackQty)) {
        this_.splitFormData.number = "";
        this_.splitFormData.lastQty = "";
        return alert("超出待拆分数量，请确认");
      }

      this_.splitFormData.lastQty = this_.splitFormData.unPackQty - totalQty;
    },

    /**
     * 拆分提交
     */
    splitSubmit() {
      if (
        !this.splitFormData.unPackQty ||
        !this.splitFormData.packQty ||
        !this.splitFormData.number
      ) {
        alert("请确认数据是否完整");
        return false;
      }

      let totalNum = this.splitFormData.number;
      if (this.splitFormData.lastQty != 0) {
        totalNum++;
      }

      if (totalNum >= 100) {
        alert("拆分数量达到100，数量较多，请确认后继续操作");
      }

      this.confirmMsg =
        "包装内平均数量为 [" +
        this.splitFormData.packQty +
        "] , 拆分的个数为 [" +
        totalNum +
        "] 件!";
      if (this.splitFormData.lastQty != 0) {
        this.confirmMsg =
          this.confirmMsg + "包含尾数[" + this.splitFormData.lastQty + "]件。";
      }
      this.isConfirmVisible = true;
    },

    splitSubmitConfirm() {
      let params = {
        invId: this.splitFormData.invId,
        packQty: this.splitFormData.packQty,
        number: this.splitFormData.number,
        lastQty: this.splitFormData.lastQty,
        acceptRecordCode :this.splitFormData.acceptRecordCode,
      };
      this.loading = true;
      wms.post({ url: "/pack/splitCt", data: params }).then((res) => {
        if (res.status == 200 && res.data.code == 200) {
          this.invList = res.data.data;
          // if (window.navigator.userAgent.toLowerCase().includes("apicloud")) {
            //调用打印机打印
            let list = this.invList;

            for (let i = 0; i < list.length; i++) {
              printToJiaBo(
                list[i].itemCode,
                list[i].itemName,
                list[i].batchName,
                list[i].quantity,
                list[i].boxCode
              );
            }

            this.loading = false;
            this.isConfirmVisible = false;
            Object.keys(this.splitFormData).forEach(
              (key) => (this.splitFormData[key] = "")
            );
          // } else {
          //   this.overlay = false;
          //   this.isConfirmVisible = false;
          //   setTimeout(function () {
          //     window.location.reload();
          //   }, 200);
          // }
        } else {
          console.log(JSON.stringify(res.data));
          this.overlay = false;
          alert("提交失败：" + res.data.data);
        }
      });
    },

    // -----------------------  拆分页面 End -------------------

    // -----------------------  组装  -------------------

    combBoxCodeSearch() {
      //Step1.校验数据
      if (!this.combFormData.srcBoxCode) {
        return this.$root.api.api.toast({
          msg: "追踪号为空",
          location: "middle",
        });
      }

      this.overlay = true;
      wms
        .get({
          url: "/inventorys/lpnStock",
          data: { boxCode: this.combFormData.srcBoxCode },
        })
        .then((res) => {
          this.overlay = false;
          if (res.status == 200 && res.data.code == 200) {
            //校验返回的库存数据
            let lpnStock = res.data.data;
            if (lpnStock == null) {
              this.$root.api.api.toast({
                msg:
                  "通过【" + this.combFormData.srcBoxCode + "】未查询到库存！",
                location: "middle",
              });
              this.combFormData.srcBoxCode = "";
              return false;
            }
            if (lpnStock.allotQuantity != 0) {
              this.$root.api.api.toast({
                msg:
                  "通过【" +
                  this.combFormData.srcBoxCode +
                  "】查询到库存存在已分配数量！",
                location: "middle",
              });
              this.combFormData.srcBoxCode = "";
              return false;
            }
            if (lpnStock.freezeQuantity != 0) {
              this.$root.api.api.toast({
                msg:
                  "通过【" +
                  this.combFormData.srcBoxCode +
                  "】查询到库存存在已冻结数量！",
                location: "middle",
              });
              this.combFormData.srcBoxCode = "";
              return false;
            }

            //赋值
            this.combFormData.srcInvId = lpnStock.inventoryId; //库存id
            this.combFormData.itemCode = lpnStock.itemCode; // 物料编码
            this.combFormData.itemName = lpnStock.itemName; // 物料名称
            this.combFormData.batchName = lpnStock.batchName; // 批次号
            this.combFormData.srcQty = lpnStock.quantity; // 原始数量
            this.combFormData.totalQty = lpnStock.quantity; //组装后数量

            // 打开目标库位焦点
            document.getElementById("id-combToBoxCode").focus();
          } else {
            alert("查询失败:" + res.data.message);
          }
        });
    },

    combToBoxCodeSearch() {
      //Step1.校验数据
      if (!this.combFormData.toBoxCode) {
        return this.$root.api.api.toast({
          msg: "追踪号为空",
          location: "middle",
        });
      }

      this.overlay = true;
      wms
        .get({
          url: "/inventorys/lpnStock",
          data: { boxCode: this.combFormData.toBoxCode },
        })
        .then((res) => {
          this.overlay = false;
          if (res.status == 200 && res.data.code == 200) {
            //校验返回的库存数据
            let lpnStock = res.data.data;
            if (lpnStock == null) {
              this.$root.api.api.toast({
                msg:
                  "通过【" + this.combFormData.toBoxCode + "】未查询到库存！",
                location: "middle",
              });
              this.combFormData.toBoxCode = "";
              return false;
            }
            if (lpnStock.allotQuantity != 0) {
              this.$root.api.api.toast({
                msg:
                  "通过【" +
                  this.combFormData.toBoxCode +
                  "】查询到库存存在已分配数量！",
                location: "middle",
              });
              this.combFormData.toBoxCode = "";
              return false;
            }
            if (lpnStock.freezeQuantity != 0) {
              this.$root.api.api.toast({
                msg:
                  "通过【" +
                  this.combFormData.toBoxCode +
                  "】查询到库存存在已冻结数量！",
                location: "middle",
              });
              this.combFormData.toBoxCode = "";
              return false;
            }

            if (this.combFormData.toBoxCode == this.combFormData.srcBoxCode) {
              this.combFormData.toBoxCode = "";
              return this.$root.api.api.toast({
                msg: "与待合并追踪号一样",
                location: "middle",
              });
            }
            //判断是否已存在
            for (let i = 0; i < this.combBoxes.length; i++) {
              if (this.combFormData.toBoxCode == this.combBoxes[i].boxCode) {
                this.$root.api.api.toast({
                  msg: "已存在【" + this.combFormData.toBoxCode + "】",
                  location: "middle",
                });
                this.combFormData.toBoxCode = "";
                return false;
              }
            }
            //赋值
            this.combBoxes.push(lpnStock); //组装后数量
            this.combFormData.totalQty =
              Number(this.combFormData.totalQty) + Number(lpnStock.quantity);
            this.combFormData.toBoxCode = "";
          } else {
            alert("查询失败:" + res.data.message);
          }
        });
    },

    /**
     * 拣货提交
     */
    combSubmit() {
      //校验提交的数量必须要等于推荐的数量
      if (!this.combFormData.srcQty) {
        return false;
      }
      if (this.combBoxes.length == 0) {
        return false;
      }

      let boxes = [];
      for (let i = 0; i < this.combBoxes.length; i++) {
        boxes.push(this.combBoxes[i].boxCode);
      }

      let params = {
        invId: this.combFormData.srcInvId,
        combBoxes: boxes,
      };
      this.overlay = true;
      wms
        .post({
          url: "/pack/combCt",
          data: params,
        })
        .then((res) => {
          console.log(JSON.stringify(res));
          if (res.status == 200 && res.data.code == 200) {
            //打印
            if (res.data.data) {
              //新标签的数量
              let invData = res.data.data;
              if (
                window.navigator.userAgent.toLowerCase().includes("apicloud")
              ) {
                printToJiaBo(
                  invData.itemCode,
                  invData.itemName,
                  invData.batchName,
                  invData.quantity,
                  invData.boxCode
                );
              }
            }

            //提交成功
            Object.keys(this.combFormData).forEach(
              (key) => (this.combFormData[key] = "")
            );
            this.combBoxes = [];
            this.overlay = false;
            alert("组装成功!!!");
          } else {
            this.overlay = false;
            alert(res.data.message);
          }
        });
    },

    // -----------------------拣货页面 E -------------------
  },
  watch: {},

  mounted() {
    //
  },
};
</script>


<style lang="scss" scoped>
.v-tabs {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: transparent;

  ::v-deep .v-tabs-items {
    flex: 1;
    background-color: transparent;

    .v-window__container {
      height: 100%;
    }
  }
}

.footer {
  position: absolute;
  padding-top: 20px;
  width: 100%;
  bottom: 0;
}

.footer1 {
  position: absolute;
  padding-top: 20px;
  width: 100%;
  bottom: 0;
}

.list_content {
  flex-direction: column;
  padding: 8px;
  min-height: 5rem;

  .col {
    padding: 2px;
    min-height: 1rem;
    text-align: right;
  }

  .row {
    margin: 0;
    background-color: transparent !important;
  }

  .card-lable {
    text-align: left;
  }

  .card-value {
    text-align: left;
  }
}

.task {
  overflow: auto;
  padding-bottom: 56px;

  &_from {
    background-color: #fff;
    margin-bottom: 6px;

    .v-text-field ::v-deep.v-input__prepend-inner {
      margin-top: 8px;
      display: flex;
      font-size: 0.875rem;
      min-width: 4rem;

      .v-input__append-inner .v-btn {
        padding: 0 10px;
        margin-bottom: 2px;

        .col {
          padding-bottom: 6px;
        }
      }
    }

    &_list .v-card__subtitle .row + .row {
      margin-top: 6px;
      justify-content: flex-end;
      padding-right: 10px;

      .col {
        padding: 6px 8px;
      }
    }
  }
}

.v-card__subtitle {
  display: flex;
  margin: 0;

  .row {
    margin: 0;
    background-color: #fff;

    .col {
      min-height: 1rem;
      padding: 8px;
    }

    .receiving_heard {
      border-top: 1px solid grey;
      font-size: 16px;
      font-weight: bold;
    }

    .row {
      background-color: inherit;
    }
  }
}

.v-card__text {
  padding: 0 10px !important;

  .row {
    margin: 0;
  }

  .col {
    padding: 8px;

    ::v-deep.v-input__prepend-outer {
      min-width: 2rem;
      margin-top: 10px;
    }
  }
}

.pickingCard {
  // background-color: skyblue;
  border-radius: 8px;
  box-shadow: 3px 3px 6px rgb(0 0 0 / 20%), 3px 3px 6px rgb(0 0 0 / 14%),
    3px 3px 6px rgb(0 0 0 / 12%) !important;

  .col {
    padding: 0;
  }

  .row {
    margin: 0;

    .col {
      height: 24px;
      font-size: 13px;
      line-height: 24px;
      color: #979899;
    }

    .pickingCard_title {
      font-size: 15px;
      font-weight: bold;
      color: #f8a73c;
    }
  }

  .v-input--selection-controls {
    margin-top: 8px;
  }

  // 10px 10px 5px #888888
}

.pickingCard-bottom {
  background-color: #fff;

  .col {
  }
}

.btn-left {
  background-color: #fff !important;

  ::v-deep.v-btn__content {
    color: #193690 !important;
  }
}

.pickingForm {
  .row {
    margin: 0;

    .col {
      padding-bottom: 0;
      padding-top: 8px;
    }
  }
  .pickingForm_view {
    margin-top: 4px;
    ::v-deep {
      .v-input {
        .v-label {
          font-size: 12px;
        }
        font-size: 12px;
      }
    }
    //.v-text-field--filled.v-input--dense.v-text-field--single-line > .v-input__control > .v-input__slot{
    //  min-height: 32px;
    //}
  }
}

// .pickingWrap {
//   padding-bottom: 66px;
//   overflow-y: auto; // 配置页面滚动
// }

::v-deep.navigationBtns .navigationBtns_return .v-btn__content {
  color: #193690;
}

::v-deep.v-bottom-navigation .v-btn__content {
  color: #fff;
  font-size: 1rem;
}

.inputPlaceholder ::v-deep.v-text-field__slot input::-webkit-input-placeholder,
input::-moz-placeholder,
input:-moz-placeholder,
input:-ms-input-placeholder {
  font-size: 15px;
}

.boxCodeDialog_card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  .boxCodeDialog_card_title {
    width: 100%;
    padding-top: 24px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffc352;
    color: #fff;
    // padding: 12px 24px 8px !important;
  }

  .v-card__text {
    margin-top: 12px;
    flex: 1;
  }

  .boxCodeDialog_card_table {
    ::v-deep .text-start {
      padding: 0 8px !important;
    }
  }

  .v-card__actions {
    width: 100%;
  }

  .msgDialog_card_title {
    padding: 12px 24px 10px !important;
  }
}

.pickingCard {
  //  修改卡片行高
  ::v-deep .v-data-table > .v-data-table__wrapper .v-data-table__mobile-row {
    min-height: 32px;
  }
}
</style>
